//
//  BaseNavigationViewCell.m
//  CapriceMusic
//
//  Created by dllo on 16/1/8.
//  Copyright © 2016年 MYX. All rights reserved.
//

#import "BaseNavigationViewCell.h"

@implementation BaseNavigationViewCell

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        self.titleLabel = [[UILabel alloc] initWithFrame:CGRectZero];
        _titleLabel.textAlignment = NSTextAlignmentCenter;
        _titleLabel.textColor = [UIColor whiteColor];
        [self addSubview:self.titleLabel];
    }
    return self;
}

- (void)setTitle:(NSString *)title {
    if (_title != title) {
        _title = title;
    }
    self.titleLabel.text = _title;
}

- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes {
    [super applyLayoutAttributes:layoutAttributes];
    self.titleLabel.frame = self.bounds;
}

@end
